<!DOCTYPE HTML>
<html>

	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="maximum-scale=1.0, minimum-scale=1.0, user-scalable=0, initial-scale=1.0, width=device-width" />
		<meta name="format-detection" content="telephone=no, email=no, date=no, address=no">
		<title>SuperWebview DEMO</title>
		<link rel="stylesheet" type="text/css" href="lib/api.css" />
		<link rel="stylesheet" type="text/css" href="css/index.css" />
		<link rel="stylesheet" type="text/css" href="css/common.css" />
		<style type="text/css">
			.home {
				text-align: center;
				width: 90%;
				margin: 30% auto;
			}
		</style>
		<script type="text/javascript">
			function login() {
				api.openFrame({
					name: 'login',
					url: 'html/login/login.html',
					reload: true,
					rect: {
						x: 0,
						y: 0,
						w: 'auto',
						h: 'auto'
					},
					pageParam: {
						index: 2
					}
				});
			}
			apiready = function() {
				//监听名为"fromNative"的事件，该事件来自Native
				api.addEventListener({
					name: 'fromNative'
				}, function(ret) {
					alert('收到来自Native的事件：\n' + JSON.stringify(ret));
				});
			};

			function requestEvent() {
				api.accessNative({
					name: 'requestEvent'
				});
			}

			function openVideo() {

			}
		</script>
	</head>

	<body>
		<div class="home">
			<ul>
				<li onclick="login()">登录</li>
				<li>聊天</li>
				<li onclick="openVideo()">视频</li>
				<li>下载文件</li>
				<li>在线播放</li>
				<li>文件上传</li>
				<li>支付</li>
			</ul>
		</div>
	</body>
	<script src="script/api.js" type="text/javascript" charset="utf-8"></script>

</html>